package com.jhc.drone.communication.vo;


import com.jhc.drone.communication.enums.DirectionEnum;
import com.jhc.drone.communication.enums.PtzDirectEnum;
import com.jhc.drone.communication.enums.PtzZoomEnum;
import lombok.Data;

import java.io.Serializable;

/**
 * @author lcp
 * @date 2025年02月2025/2/10 14:11
 * @describe
 */
@Data
public class PtzVo implements Serializable {

    // 变焦倍数
    private float zoomMultiple;

    // 俯仰角度
    private float pitchAngle;

    // 方向角度
    private float directAngle;

    // 变焦速度
    private float zoomSpeed;

    // BIGGER-放大,SMALLER-缩小
    private PtzZoomEnum bigger;

    // 复位/垂直向下：RESET-复位，VERTICAL_DOWN-垂直向下
    private PtzDirectEnum direction;

    // 移动速度
    private float moveSpeed;

    // 移动方向
    private DirectionEnum moveDirection;

    public float getParam3() {
        if (this.moveDirection != null) {
            if (this.moveDirection == DirectionEnum.DOWN) {
                return -this.moveSpeed;
            }
            if (this.moveDirection == DirectionEnum.UP) {
                return this.moveSpeed;
            }
        }
        return 0.5f;
    }

    public float getParam4() {
        if (this.moveDirection != null) {
            if (this.moveDirection == DirectionEnum.LEFT) {
                return -this.moveSpeed;
            }
            if (this.moveDirection == DirectionEnum.RIGHT) {
                return this.moveSpeed;
            }
        }
        return 0.5f;
    }
}

